﻿<%str_xml ="<?xml version='1.0' encoding='UTF-8'?>"
  str_xml +="<graph caption='' showBorder='0' bgColor='FFFFFF' subCaption='' decimalPrecision='0' showNames='1' showValues='1'
  numberSuffix='' pieSliceDepth='30' formatNumberScale='0' baseFontSize='14'>"

  i = 0
  for item in @part_results
  %>
<% if Part.find(item.part_id).formula and Part.find(item.part_id).formula.size > 0%>
<% item_total=count_by_formula(item.total, Part.find(item.part_id).formula)%>
<%        str_xml += "<set name='" + Dimen.find(item.dimen_id).name+ "' value='" + item_total.to_s + "' color='" + get_FC_color + "'/>"
%>
<% else %>
<%     str_xml += "<set name='" + Part.find(item.part_id).name+ "' value='" + item.total.to_s + "' color='" + get_FC_color + "'/>"
%>
<% end %>
<%   i += 1
  end
  str_xml+="</graph>"
%><%=str_xml%>
